You can make your software more resilient to internal changes by realizing a class has two distinct interfaces for two distinct sets of clients:
* its 'public:' interface serves unrelated classes
* its 'protected:' interface serves derived classes
A class that is intended to have a long and happy life can hide its physical bits in its 'private:' part, then put 'protected:' inline access functions to these data. The private bits can change, but if the protected access fns are stable, subclasses (ie: derived classes) won't break (though they'll need to be recompiled after a change to the base class).